from django.contrib import admin
from activity.models import Activity, ActivityPicture, ActivityEnroll


class ActivityPictureInline(admin.StackedInline):
    model = ActivityPicture


class ActivityEnrollInline(admin.StackedInline):
    model = ActivityEnroll


class ActivityAdmin(admin.ModelAdmin):
    list_display = ('activity_title', 'activity_thumbnails', 'activity_start_time', 'activity_end_time',
                    'activity_place', 'activity_content', 'activity_enroll_count')
    inlines = [ActivityPictureInline, ActivityEnrollInline]

# Register your models here.
admin.site.register(Activity, ActivityAdmin)

